#!/usr/bin/groovy
@Library('test-shared-library') _

properties(
        [
                pipelineTriggers([cron('H 16 * * *')]),
                buildDiscarder(logRotator(numToKeepStr: '10'))
        ]
)

def pipeline
def sparkVersions
def testH2OBranch
node("docker") {
    cleanWs()
    checkout scm
    pipeline = load 'ci/sparklingWaterPipeline.groovy'
    def commons = load 'ci/commons.groovy'
    sparkVersions = commons.getSupportedSparkVersions()
    testH2OBranch = commons.loadGradleProperties("gradle.properties")["testH2OBranch"]
}

pipeline(params) { p ->
    sparkMajorVersions = sparkVersions
    runUnitTests = "true"
    runPyUnitTests = "true"
    runRUnitTests = "true"
    runIntegTests = "true"
    runPyIntegTests = "true"
    buildAgainstH2OBranch = "true"
    h2oBranch = testH2OBranch
    hadoopVersion = "2.7"
    backendMode = "both"
    driverHadoopVersion = "hdp2.2"
    uploadNightly = "true"
    uploadNightlyDockerImages = "true"
}
